﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Runtime.Serialization;
using System.Windows.Media;
using GMap.NET;
using GMap.NET.WindowsPresentation;
namespace GMapWpf
{
#if !PocketPC
    [Serializable]
    public class GMapMarkerPolygon : GMapMarker, ISerializable
#else
    public class GMapMarkerPolygon : GMapMarker
#endif
    {
        /// <summary>
        /// In Meters 用米数确定圆
        /// </summary>
        public int Radius;


        /// <summary>
        /// 用两个点确定圆
        /// </summary>
        //public PointLatLng mouseLastPoint;

        public bool isDrawed = false;
        public List<PointLatLng> drawingPoints = new List<PointLatLng>();


        public void addPoint(PointLatLng point)
        {
            drawingPoints.Add(point);
        }

        #region ISerializable Members

        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
        {
            //base.GetObjectData(info, context);

            // TODO: Radius, IsFilled
        }

        //protected GMapMarkerPolygon(SerializationInfo info, StreamingContext context)
        //   : base(info, context)
        //{
        //    // TODO: Radius, IsFilled
        //}

        #endregion
        /// <summary>
        /// 是否用米数确定圆
        /// </summary>
        public bool IsMeter = true;


        /// <summary>
        /// specifies how the outline is painted
        /// </summary>
        [NonSerialized]
#if !PocketPC
        public System.Drawing.Pen Stroke = new System.Drawing.Pen(System.Drawing.Color.FromArgb(155, System.Drawing.Color.MidnightBlue));
#else
       public Pen Stroke = new Pen(Color.MidnightBlue);
#endif

        /// <summary>
        /// background color
        /// </summary>
        [NonSerialized]
#if !PocketPC
        public System.Drawing.Brush Fill = new SolidBrush(System.Drawing.Color.FromArgb(155, System.Drawing.Color.AliceBlue));
#else
       public Brush Fill = new System.Drawing.SolidBrush(Color.AliceBlue);
#endif

        /// <summary>
        /// is filled
        /// </summary>
        public bool IsFilled = false;

        public GMapMarkerPolygon(PointLatLng p)
           : base(p)
        {
            Radius = 0;
            //this.Shape.redn


        }

     
    }
}
